'use strict';

const axios = require('axios')

const BASE_URL = process.env.CM_CLI_BASE_URL || 'http://localhost.fobiz-cli-service.net:7001'

const request = axios.create({
    baseURL: BASE_URL,
    timeout: 10000,
    proxy: false
})

request.interceptors.response.use(response => {
    return response.data
}, error => {
    return Promise.reject(error)
})

module.exports = request;
